package com.project.seckill.service;

import com.project.seckill.bo.KeyPrefix;

/**
 * Created by yachao on 2018/6/24.
 */
public interface RedisService {

    <T> T get(KeyPrefix keyPrefix, String key, Class<T> cls);

    <T> boolean set(KeyPrefix keyPrefix, String key, T value);

    boolean exists(KeyPrefix keyPrefix, String key);

    Long incr(KeyPrefix keyPrefix, String key);

    Long decr(KeyPrefix keyPrefix, String key);
}
